package com.study.consumer;


import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

@Component
public class MyMessageListener {


    @RabbitListener(queues = "queue.boot")
    public void getMessage(@Payload String message, @Header("mykey") String value){

        System.out.println(message);
        System.out.println("mykey"+value);

    }


}
